home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / INFO.ASM < prev    next >
Encoding:
Assembly Source File  |  1998-05-21  |  4.8 KB  |  152 lines

  1. .DATA
  2. ;---───────════════════════════════════════════════════════════════───────----
  3. ;                The Data you'll have to change 
  4. RGBcolor dd 0080ff10h              ;0x00RRGGBB
  5. Crked_P_Name    db 12 dup (' '),"-> CrAcK mE #4 <-",12 dup (' '),0
  6. Crk_Title       db "cRACK-Me #4 by THE_q/PC",0
  7. Info_title      db "cRACK-Me #4 - cODE by THE_q/PC -",0
  8. Info_txt        db "                 -- tHE fILE cHELLANGE 2 --",10,13,10,13
  9.                 db "My e-MAIL :    Phrozen_q@CyberDude.com"
  10.                 db 10,13,10,13,"EnJoY! =)",10,13
  11.                 db "                                THE_q",10,13
  12.                 db "                        [ PhRoZeN cReW ]",0
  13.  
  14. ;                The Data you'll have to change 
  15.  
  16. Slen    dd (OFFSET Crk_Title - OFFSET Crked_P_Name - 1)
  17. Button_Cls      DB "BUTTON",0
  18. Button_txt      DB "CONTiNUE",0
  19. Button_txt2     DB "EXiT",0
  20. Info_ClassName  DB "CracK Info",0
  21. ID_Button1      DW 0
  22. Bmp_Name        DB "LogoPIC",0
  23.  
  24. .CODE
  25. ;---───────════════════════════════════════════════════════════════───────----
  26. Display_Info_window     PROC
  27.         USES eax,ebx,ecx,edx,esi,edi,ebp        ;  Just in Case .. 
  28.     mov    s1.w_style, CS_HREDRAW + CS_VREDRAW + CS_DBLCLKS
  29.     mov    s1.w_lpfnWndProc, offset Inf_WndPROC
  30.     mov    s1.w_cbClsExtra, 0
  31.     mov    s1.w_cbWndExtra, 0
  32.     mov    eax, hInst
  33.     mov    s1.w_hInstance, eax
  34.       call LoadIcon, hInst, OFFSET sziconname
  35.     mov    s1.w_hIcon, eax
  36.       call LoadCursor,NULL, IDC_ARROW
  37.     mov    s1.w_hCursor, eax
  38.     mov    s1.w_hbrBackground, 4
  39.     mov    s1.w_lpszMenuName, OFFSET Nada
  40.     mov    s1.w_lpszClassName, OFFSET Info_ClassName
  41.  
  42.     call RegisterClass, OFFSET s1
  43.  
  44.       Call Create_window_Items1                       ;  Look Below 
  45.  
  46.     Call SetTextAlign , hDC , TA_CENTER
  47.  
  48.     call ShowWindow, mainhwnd,SW_SHOWNORMAL
  49.     call UpdateWindow, mainhwnd
  50.  
  51. msg_loop1:
  52.     call GetMessage, OFFSET s2, 0,0,0
  53.     cmp    ax, 0
  54.         je      end_loop1
  55.     call TranslateMessage, OFFSET s2
  56.     call DispatchMessage, OFFSET s2
  57.     jmp    msg_loop1
  58.  
  59. end_loop1:
  60.         RET                                     ;  Continue with kEYGEN 
  61.  
  62.  
  63. ;---───────════════════════════════════════════════════════════════───────----
  64. ;Create all the items in the INFO window
  65. Create_window_Items1    PROC
  66.     call CreateWindowEx, 0,OFFSET Info_ClassName,OFFSET Info_title, \
  67.                          WS_CAPTION+WS_SYSMENU+WS_THICKFRAME,       \
  68.                          150,160,500,200, 0, 0, hInst, 0
  69.     mov    mainhwnd, eax
  70.  
  71.     Call CreateWindowEx, NULL,OFFSET Button_Cls,OFFSET Button_txt, \
  72.                          WS_VISIBLE+WS_CHILD+BS_PUSHLIKE+BS_TEXT,  \
  73.                          175,130,90,30, mainhwnd, 0 ,hInst,0
  74.     mov ID_Button1,ax
  75.  
  76.     Call CreateWindowEx, NULL,OFFSET Static_cls,OFFSET Info_txt,   \
  77.                          WS_VISIBLE+WS_CHILD+SS_LEFT,              \
  78.                          175,5,305,120, mainhwnd, 0 ,hInst,0
  79.  
  80.     Call CreateWindowEx, NULL,OFFSET Static_cls,OFFSET Bmp_Name,   \
  81.                          WS_VISIBLE+WS_CHILD+SS_BITMAP,            \
  82.                          5,5,150,151, mainhwnd, 0 ,hInst,0
  83.     RET
  84. Create_window_Items1    ENDP
  85.  
  86.  
  87. ;---───────════════════════════════════════════════════════════════───────----
  88.     PUBLIC Inf_WndPROC
  89. Inf_WndPROC proc STDCALL, hwnd:DWORD, wmsg:DWORD, wparam:DWORD, lparam:DWORD
  90.     USES  ebx, edi, esi
  91.     LOCAL    hDC:DWORD
  92.  
  93.     mov eax,hwnd        ;useful to make these static.
  94.     mov g_hwnd,eax
  95.     mov eax,wmsg
  96.     mov g_message,eax
  97.     mov eax,wparam
  98.     mov g_wparam,eax
  99.     mov eax,lparam
  100.     mov g_lparam,eax
  101.  
  102.     xor eax,eax
  103.     mov ax,WORD PTR g_message
  104.     .IF ax==WM_DESTROY
  105.       call    wmdestroy1                       ;  Look Below 
  106.     .ELSEIF ax==WM_PAINT
  107.       call    wmpaint1                         ;  Look Below 
  108.     .ELSEIF ax==WM_COMMAND
  109.       call    wmcommand1                       ;  Look Below 
  110.     .ELSE
  111.       call DefWindowProc, hwnd,wmsg,wparam,lparam
  112.       ret
  113.     .ENDIF
  114.     xor eax,eax
  115.     ret
  116. Inf_WndPROC ENDP
  117.  
  118. ;---───────════════════════════════════════════════════════════════───────----
  119.  
  120. wmpaint1 PROC
  121.     call BeginPaint, hwnd,OFFSET s3
  122.     mov    hDC, eax
  123.  
  124.     Call SetTextColor , hDC , RGBcolor
  125.     Call SetBkColor , hDC , 0
  126.     Call TextOut , hDC ,271 , 135 , OFFSET Crked_P_Name , Slen
  127.  
  128.     call EndPaint, hwnd,OFFSET s3
  129.     ret
  130. wmpaint1 ENDP
  131.  
  132. wmdestroy1 PROC
  133.        xor eax,eax
  134.        mov ax,ID_Button1
  135.     mov RGBcolor , 00ffffffh
  136.     Call SendMessage,eax , WM_SETTEXT, 0, OFFSET Button_txt2
  137.     call ShowWindow, mainhwnd,SW_SHOWMINNOACTIVE
  138.     call PostQuitMessage,0
  139.     ret
  140. wmdestroy1 ENDP
  141.  
  142. wmcommand1 PROC
  143.     mov ax,WORD PTR g_lparam
  144.     .IF ax==ID_Button1               ;Button pressed
  145.                 Call wmdestroy1
  146.     .ENDIF
  147.     ret
  148. wmcommand1 ENDP
  149.  
  150. ;---───────════════════════════════════════════════════════════════───────----
  151. Display_Info_window     ENDP
  152.